﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace RJ.Objects.GameEngine
{
    public class Background : Sprite
    {
        private Image backgroundImage;
        private Point position;

        public Background(GameObject game, string path)
            : this(game, new Bitmap(path)) { }

        public Background(GameObject game, Image backImage)
            : base(game)
        {
            backgroundImage = backImage;
            position = new Point(0);
        }

        public override void Update(double gameTime, double elapsedTime)
        {
            // The background does nothing. There is no need for update.
            // for compatibility we will override and have a blank method
        }

        public override void Draw(Graphics g)
        {
            g.DrawImage(backgroundImage, position);
        }
    }
}
